<?php
class Report_Form_ExpireProduct extends ZendX_JQuery_Form
{
	public function __construct(Zend_Controller_Action $controller)
	{		
		$this->setMethod("get");
		
		//inbound_create_time_a
		$inbound_create_time_a = new Itvina_JQuery_Form_Element_DatePicker ( 'inbound_create_time_a' ,array('jQueryParams' => array('dateFormat' => 'd.m.yy')));
		$inbound_create_time_a
		->setLabel ( "Ngày hết hạn từ ngày" )
		//->setDescription ( $controller->getHelper('common')->getDescription('inbound_create_time' ))
		;
		
		//inbound_create_time_b
		$inbound_create_time_b = new Itvina_JQuery_Form_Element_DatePicker ( 'inbound_create_time_b' ,array('jQueryParams' => array('dateFormat' => 'd.m.yy')));
		$inbound_create_time_b
		->setLabel ( "<span style='color:#f4f4f4'>Ngày hết hạn</span> đến ngày" )
		//->setDescription ( $controller->getHelper('common')->getDescription('inbound_create_time' ))
		;
		
		//warehouse_code
		$warehouse_code=$this->createElement ( 'select', 'warehouse_code' )
		->setLabel("Kho")
		;
		
		//warehouse_group_code
		$warehouse_group_code=$this->createElement ( 'select', 'warehouse_group_code' )
		->setLabel("Nhóm kho")
		;
		
		//inventory_location_code
		$inventory_location_code=$this->createElement ( 'select', 'inventory_location_code' )
		->setLabel("Vị trí lưu kho")
		;
		
		//inbound_detail_product_code
		$inbound_detail_product_code=$this->createElement ( 'select', 'inbound_detail_product_code' )
		->setLabel ( "Hàng hóa" )
		->setDescription ( 
		"<br/><br/>"
		.$controller->view->partial("index/manage/submit.phtml",'admin',array('value'=>'Tìm kiếm thông tin','onclick'=>"$('#adminForm').submit();")))
		;
		
		//product_group_code
		$product_group_code=$this->createElement ( 'select', 'product_group_code' )
		->setLabel("Nhóm hàng hóa")
		//->setDescription ( $controller->getHelper('common')->getDescription('inbound_order_code' ))
		;
		
		$this->addElements ( array (
			$inbound_create_time_a,
			$inbound_create_time_b,
			$warehouse_group_code,
			$product_group_code,
			$inbound_detail_product_code,
			$inventory_location_code,
			$warehouse_code
		) );	
		
		$controller->getHelper ( 'common' )->form ( $this );
	}
}